1. Field of the Invention
The present invention relates to a two-way communication circuit, a two-way communication system, and a communication method of the two-way communication circuit that are suitable for IEEE 1394 or HDMI (High Definition Multimedia Interface) or the like for example, which are network and interface technology applied to digital products such as PC, digital appliance, and in-vehicle video device.
2. Description of Related Art
Digitization of video application has recently been accelerated and digitization of transmission path physically transmitting video has also been digitalized. IEEE 1394 and HDMI and the like are employed as digital interface technologies, and Ethernet and the like are employed as a network technology. It has now been discovered that transfer efficiency is not maximized in these systems due to arbitration signal for data transmission, retransmission, idle period between data or the like.
As shown in FIG. 10, in a typical ping-pong transmission, transmission and reception are alternately repeated and information is exchanged by one transmission path or a pair of transmission paths. Note that the ratio of transmission to reception is one to one.
On the other hand, in a ping-pong transmission method disclosed in Japanese Unexamined Patent Application Publication No. 09-098200 (Iinuma), ratio of transmitting to receiving can be changed by performing continuous receiving or transmitting. In this ping-pong transmission method, transmission or reception is kept when a start bit is 1. Transmission and reception are changed when the start bit is 0. FIG. 11 shows a data transmission method disclosed in Iinuma. In FIG. 11, transmission and reception are switched by setting the start bit of second transmission, fourth transmission, and seventh transmission to 0. In other transmissions, transmission or reception is kept by setting the start bit to 1.
In a data transfer control device disclosed in Japanese Unexamined Patent Application Publication No. 2005-260361 (Shibata et al.), a host-side device transmits a transfer direction request code after packet data and a target-side device detects the transfer direction request code, thereby making it possible to switch between a transmission direction and a reception direction. In other words, the data transfer control device includes a transmitter circuit which transmits data through a serial signal line and a receiver circuit which receives data through the serial signal line. The data transfer control device further includes a transfer direction switch circuit which performs switching between the transmission direction and the reception direction, and a transfer direction switch indication circuit which indicates the transfer direction switch circuit to switch the transfer direction. The data transfer control device further includes a code generation circuit which generates a transfer direction switch request code when the transfer direction switch request has been received from a higher-order layer circuit. When the transfer direction switch request has been received from the upper layer circuit, the transmitter circuit transmits the transfer direction switch request code through the serial signal line, and the transfer direction switch indication circuit indicates the transfer direction switch circuit to switch the transfer direction from the transmission direction to the reception direction after the transfer direction switch request code has been transmitted. By having such a structure, it is possible to prevent two transmitter circuits being connected to the serial signal line when the transfer direction is switched.
Further, Japanese Unexamined Patent Application Publication No. 61-169037 (Imokawa) discloses the following method. In a two-way serial data transmission method between a master logic circuit and a slave logic circuit to which the same clock signal are given, both of the master logic circuit and the slave logic circuit being in the same device, header indicating transfer direction control pattern as well as synchronization information are inserted to the serial data transmitted from the master logic circuit to the slave logic circuit. When the slave logic circuit detects the header indicating the direction control pattern, the slave logic circuit switches from a reception mode to a transmission mode for a certain period of time, and the slave circuit performs transmission in the reverse direction. Therefore, data transmission can be performed by one signal line except the clock line.
However, according to the method disclosed in Iinuma, as shown in FIG. 12, when transmission unit is large, there are areas where data is not transmitted. Therefore, full bandwidth is not used at all times. In FIG. 12, thick line shows data that is actually transmitted or received. However, it can be seen that full bandwidth is not used at all times and there are some area that is not used for transmission or reception of data because only a part of slot of transmission and reception is used.
On the other hand, when transmission unit is small, influence of bit indicating switching of transmission and reception becomes large, which causes decreasing of transmission efficiency. In FIG. 13, the ratio of the start bit to the whole is large because the transmission unit is small.
As stated above, although continuous transmission or continuous reception is possible, transmission time or reception time per one burst is constant and the same burst time is spent even when an amount of transmission data or reception data is small, which causes wasting of time. Further, a bit for switching transmission is added to start bit of each transmission data. Therefore, it causes a problem that the ratio of bit for switching to the whole transmission data becomes large when the transmission unit is small and transfer efficiency degrades.
In application systems, functions that are required are different between systems. For example, a display device such as display or monitor does not need to control a main body such as TV or PC (personal computer) in a display system such as connecting the PC and the monitor or connecting a digital TV and a tuner, for example. However, two-way communication is required in in-vehicle LAN (local area network), for example, where it is assumed that a car navigation and a camera video process unit cooperate with each other to realize one application. In such a case, the slave (target device) also needs to obtain a transmission right.
However, we have now discovered that the above-described techniques have problems below. For example, in the technique disclosed in Iinuma, the host controls switching of transmission and reception, and the slave cannot control the switching of transmission and reception. Further, in the data transfer control device disclosed in Shibata et al., the target cannot obtain the transmission right by itself. Therefore, this technique is not suitable for the application in which transfer direction is needed to be controlled by both of the host and the target. Further, in the two-way serial data transfer method disclosed in Imokawa, only the master side transmits the transmission direction control pattern and the slave side cannot obtain the transmission right. Transmission time from the slave to the master is fixed and the slave cannot arbitrary set or change transmission time by itself.